import React from 'react';
import ReactDOM from 'react-dom/client';
//或者直接解构出来
//import {createRoot} from 'react-dom/client';

const sp = React.createElement("span", {
	id: "sp01"
}, "第一个React脚手架项目");
const title = React.createElement("h1", {
	title: "标题内容",
	id: "hhh1"
}, "hello word!", sp);

ReactDOM.createRoot(document.getElementById("root")).render(title);
//或者直接调用createRoot函数
//createRoot(document.getElementById("root")).render(title);
